A Semantics-Based Determinacy Analysis for Prolog with Cut

نویسنده

  • Torben Æ. Mogensen
چکیده

At PEPM’91 Sahlin presented a determinacy analysis for Prolog with cut. The analysis was, however, not justified in any kind of semantics for Prolog, so correctness was argued with respect to an intuitive idea of the behaviour of Prolog programs. We now start with a denotational semantics of Prolog and derive a variant of Sahlins analysis as an abstraction of this. We observe that we avoid some problems Sahlin had, and in addition get rid of some redundant domain elements, which our semantics show can not be distinguished by any context. To obtain better precision in the abstract interpretation we do fixedpoint iteration in two steps: First we find the least equivalence class using a powedomain ordering, then we find the least fixed-point within that equivalence class using the subset ordering. We believe this method is original.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

RedAlert: Determinacy inference for Prolog

This paper revisits the problem of determinacy inference addressing the problem of how to uniformly handle cut . To this end a new semantics is introduced for cut , which is abstracted to systematically derive a backward analysis that derives conditions sufficient for a goal to succeed at most once. The method is conceptionally simpler and easier to implement than existing techniques, whilst im...

متن کامل

Sequence-based abstract interpretation of Prolog

Abstract interpretation is a general methodology for systematic development of program analyses. An abstract interpretation framework is centered around a parametrized nonstandard semantics that can be instantiated by various domains to approximate different program properties. Many abstract interpretation frameworks and analyses for Prolog have been proposed, which seek to extract information ...

متن کامل

An Automatic Partial Evaluator for Full Prolog

A partial evaluator for Prolog takes a program and a query and returns a program specialized for all instances of that query. The intention is that the generated program will execute more efficiently than the original one for those instances. This thesis presents “Mixtus”, an automatic partial evaluator for full Prolog, i.e. including non-logical features such as cut, assert, var, write etc. Mi...

متن کامل

Denotational and Operational Semantics for Prolog

The semantics of Prolog programs is usually given in terms of the model theory of first order logic. However, this does not adequately characterize the computational behavior of Prolog programs. Prolog implementations typically use a sequential evaluation strategy based on the textual order of clauses and literals in a program, as well as non-logical features like ‘‘cut’’. In this work we devel...

متن کامل

Continuation Semantics for PROLOG with Cut

We present a denotational continuation semantics for Prolog with cut. First a uniform language B is studied, which captures the control flow aspects of Prolog. The denotational semantics for B is proven equivalent to a transition system based operational semantics. The congruence proof relies on the representation of the operational semantics as a chain of approximations and on a convenient ind...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996